package com.servlet;

import com.util.UtilJdbc;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class SearchServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("service");

        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");

        String name=req.getParameter("zuname");
        String password=req.getParameter("zupassword");
        String email=req.getParameter("Email");

        UtilJdbc utilJdbc=new UtilJdbc();
        utilJdbc.search(name,password,email);
        req.getRequestDispatcher("index.jsp").forward(req,resp);
    }
}
